﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using LGSVR.Common;

namespace LGSVR.BLL.Sys
{
    public class messageLogListBLL
    {

        public DataTable GetgroupNameList()
        {
            string sql = "select groupID,groupName from cardGroup where state=1 ";
            List<SqlParameter> lstParam = new List<SqlParameter>();
           
            DataTable dt = SQLHelper.GetDataTable(sql, CommandType.Text, lstParam.ToArray());

            return dt;
        }

        public DataTable GetCordIDList(string strgroupID)
        {
            string sql = "select * from cardinfo where state=1 ";
            if (strgroupID != "")
            {
                sql += " and groupID!=@groupID";
            }
            List<SqlParameter> lstParam = new List<SqlParameter>();
            lstParam.Add(new SqlParameter("@groupID", strgroupID));
            DataTable dt = SQLHelper.GetDataTable(sql, CommandType.Text, lstParam.ToArray());

            return dt;
        }
    }
}
